package com.woniuxy.educationplatform.handler;

import com.woniuxy.educationplatform.util.ResultUtil;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author unreleased
 * @date 2020/12/17 14:42
 * 全局异常处理器
 */
@RestControllerAdvice
public class GlobalExceptionHandler {
    /**
     *
     * @param e 异常名
     * @return
     */
    public ResultUtil handler(Exception e){
        return new ResultUtil().setCode(ResultUtil.ERROR).setMessage("系统繁忙，请稍后重试");
    }
}
